
import {Inject, Injectable} from '@nestjs/common';
import {REQUEST} from "@nestjs/core";
import {User} from "@/entitys/base/user.entity";

@Injectable()
export class CommonUtils {
    constructor(@Inject(REQUEST) private readonly request: Request) {

    }

    getUser(): User {
        // @ts-ignore
       return this.request.user;
    }
}
